<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>电器维修系统</title>
<%@ include file="/WEB-INF/views/include/head.jsp"%>

<script type="text/javascript">
	$(document).ready(function() {

		if (getQueryString("loginFlag") != "88") {
			top.location.href = "${ctx}/login.jsp?loginFlag=88"
		}
	});

	function getQueryString(name) {
		// 如果链接没有参数，或者链接中不存在我们要获取的参数，直接返回空
		if (location.href.indexOf("?") == -1
				|| location.href.indexOf(name + '=') == -1) {
			return '';
		}

		// 获取链接中参数部分
		var queryString = location.href
				.substring(location.href.indexOf("?") + 1);

		// 分离参数对 ?key=value&key2=value2
		var parameters = queryString.split("&");

		var pos, paraName, paraValue;
		for (var i = 0; i < parameters.length; i++) {
			// 获取等号位置
			pos = parameters[i].indexOf('=');
			if (pos == -1) {
				continue;
			}

			// 获取name 和 value
			paraName = parameters[i].substring(0, pos);
			paraValue = parameters[i].substring(pos + 1);

			// 如果查询的name等于当前name，就返回当前值，同时，将链接中的+号还原成空格
			if (paraName == name) {
				return unescape(paraValue.replace(/\+/g, " "));
			}
		}
		return '';
	};
</script>
</head>

<body>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td height="147" width="" background="${ctxStatic}/images/top02.gif"><img
				src="${ctxStatic}/images/top03.png" width="1024" height="147" /></td>
		</tr>
	</table>
	<table width="562" border="0" align="center" cellpadding="0"
		cellspacing="0" class="right-table03">
		<tr>
			<td width="221"><table width="95%" border="0" cellpadding="0"
					cellspacing="0" class="login-text01">

					<tr>
						<td><table width="100%" border="0" cellpadding="0"
								cellspacing="0" class="login-text01">
								<tr>
									<td align="center"><img
										src="${ctxStatic}/images/ico13.gif" width="107" height="97" /></td>
								</tr>
								<tr>
									<td height="40" align="center">&nbsp;</td>
								</tr>

							</table></td>
						<td><img src="${ctxStatic}/images/line01.gif" width="5"
							height="292" /></td>
					</tr>
				</table></td>
			<form action="${ctx}/sys/index" method="post"
				onsubmit="return logver()">
				<td><table width="100%" border="0" cellspacing="0"
						cellpadding="0">
						<tr>
							<td width="31%" height="35" class="login-text02">用户名称：<br /></td>
							<td width="69%"><input id="name" name="name" type="text"
								size="22" /></td>
						</tr>
						<tr>
							<td height="35" class="login-text02">密 码：<br /></td>
							<td><input id="password" name="password" type="password"
								size="22" /></td>
						</tr>
						<tr>
							<td></td>
							<td><font color="red" id="font">${error}</font></td>
						</tr>
						<tr>
							<td height="35">&nbsp;</td>
							<td><input name="Submit2" type="submit"
								class="right-button01" value="确认登陆" />
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input name="Submit232"
								type="reset" class="right-button02" value="重 置" /></td>
						</tr>
					</table></td>
			</form>
		</tr>
	</table>
</body>
</html>